package Operations;

import Book.book;
import Book.bookList;
//定义展示书籍操作这个类重写实现接口中的work抽象方法
public class DisplayOperation implements Ioperations{
    @Override
    public void work(bookList bookList) {
        //获取当前书架中书的总数量
        int used=bookList.getUseMount();
        //遍历打印所有书籍
        System.out.println("所有书籍列表如下");
        for (int i=0; i <used ; i++) {
            book book=bookList.getBooks(i);
            System.out.println(book);
        }

    }
}
